home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 036a / os2info.zip / REPORT.OS2 < prev    next >
Text File  |  1991-05-20  |  22KB  |  442 lines

  1. Report Date: Wed May 27 15:38:26 1987
  2. ----------
  3. TITLE: IBM seminar report
  4.  
  5. This information is extracted from my trip report on the IBM
  6. seminar last week.  It is subject to the usual caveats in that it
  7. may all be lies - I'm just reporting from memory what IBM told
  8. me.  In particular, anything that looks like a direct quotation of
  9. IBM people should be considered in light of the fact that we used 
  10. cold bottles of Becks each evening for memory refresh.  Don't anyone 
  11. sue me for quoting them out of context.  All conclusions and opinions 
  12. are solely my fault - if you don't like them go buy a Mac!  This 
  13. is *not* a review as there was very little hands-on that was not 
  14. supervised by IBM folk.  
  15.  
  16. Enjoy, Matt
  17. ====================================================================
  18.  
  19. Trip Report: IBM Technical Seminar, PS/2 and OS/2
  20.              May 18-22, 1987
  21.  
  22. By:          Matt Trask
  23.              May 26, 1987
  24.  
  25.  
  26. Overview
  27.  
  28.     Last week I attended two of the three sessions
  29.     provided by IBM for independent developers.  I have
  30.     summarized the presentation in three sections - PS/2,
  31.     OS/2, and future directions.  
  32.  
  33.     This is not necessarily a review as there was very little
  34.     hands-on.  Most of this report is based on information
  35.     provided by IBM engineers and product managers.
  36.  
  37. OS/2
  38.  
  39.     The OS/2 presentation was opened with a presentation of
  40.     IBM's System Application Architecture (SAA) strategy.  For
  41.     anyone that is not familiar, SAA is a plan of
  42.     connectivity, application portability, and a common
  43.     user interface that is intended to give business users
  44.     that fuzzy blue feeling that can only occur when all of
  45.     your machines are IBM and running IBM supported software.
  46.     This plan spans from the Model 50 up to the largest IBM
  47.     mainframes and specifies details such as the supported
  48.     programming languages.  All comments that IBM made about
  49.     OS/2 and much of the PS/2 remarks were phrased in terms of
  50.     SAA compatibility.
  51.  
  52.     OS/2 provides three programming models: Compatible, Family
  53.     API, and OS/2 API.  The simplest of the three is
  54.     Compatible - it allows many existing PC applications to
  55.     execute in a "DOS Box".  There is no protection for the
  56.     system from such programs and their performance will
  57.     probably be degraded by running in a multitasking
  58.     environment.  This is provided "only as a migration path".
  59.  
  60.     The Family API programming model is a limited subset of
  61.     OS/2's full capabilities.  Programs that are built with
  62.     the Family API assumptions can run unmodified under DOS
  63.     3.x as well as OS/2.  For many applications this is the
  64.     best strategy for creating a product to fit the largest
  65.     markets, especially products like language translators
  66.     that don't need to use any Gee Whiz features like
  67.     graphics.
  68.  
  69.     The full OS/2 API includes tasking, IPC, and advanced
  70.     timer services, as well as Family API services such as
  71.     memory allocation and file I/O.  This model provides full
  72.     hardware protection for the system.
  73.  
  74.     The system is still configured with CONFIG.SYS but many
  75.     new commands have been added.  PROTSHELL is the PM
  76.     equivalent of the SHELL command.  RUN is used to start
  77.     background programs such as mail daemons. PROTECTONLY and
  78.     RMSIZE control the existence and size of the "DOS box".
  79.     MAXWAIT sets a timeout limit to control process starvation.
  80.     A starving process will have its priority raised
  81.     temporarily on a MAXWAIT timeout to guarantee CPU cycles.
  82.     TIMESLICE can be use to tune the quantum length.  MEMMAN
  83.     commands such as SWAP/NOSWAP and MOVE/NOMOVE control
  84.     whether tasks can be swapped to disk and whether the OS
  85.     can rearrange segments in memory to use its resources
  86.     efficiently.  SWAPPATH defines the file resource that will
  87.     be used for virtual memory (Caveat: swapper will fill a
  88.     disk until it fails if you overload it!).  The TRACE and
  89.     TRACEBUF commands control the size and use of a ring
  90.     buffer to store OS events for later analysis.  This buffer
  91.     and its contents are not documented - intended for IBM use
  92.     in troubleshooting end user problems.
  93.  
  94.     Device Drivers under OS/2 are quite different from DOS
  95.     device drivers.  They run at CPL=0 thus allowing the
  96.     programmer to have the run of the system.  An OS/2 device
  97.     driver is bimodal - it must be able to run in real or
  98.     protected mode without distinguishing between the two.
  99.     For example, a driver could start an I/O in protected mode
  100.     and go to sleep.  The completion interrupt could occur
  101.     after the kernal swaps to real mode to run the "DOS box".
  102.     Drivers, like applications, are dynamically linked at load
  103.     time.
  104.  
  105.     Device drivers are officially *not* written in C.  There
  106.     is no guarantee of adequate stack resources when a driver
  107.     is executing.  The IBM engineers were very uncomfortable
  108.     with the thought of C drivers, suggesting that subsystems
  109.     were the place for C code.
  110.  
  111.     The parts of a driver are Strategy Routine (real code, not
  112.     a pointer-saver), Interrupt Routine (this is the ISR as in
  113.     Unix, not just a name as in DOS), Timer Handler (used for
  114.     device timeouts), and a software interrupt handler that is
  115.     used only in real mode.  A set of OS functions known as
  116.     DevHlp services are available to drivers - these functions
  117.     can be used for limited file handling, memory allocation,
  118.     pointer normalization (to remove mode dependencies), etc.
  119.  
  120.     IOCTL is no longer an optional function - it must be
  121.     supported in all drivers.  There is a new field in the
  122.     attribute word that defines the minimum version of the OS
  123.     required to run the driver.  Monitors are supported as a
  124.     way for user level applications to examine the data stream
  125.     as it passes through a driver.  This function is
  126.     cooperative in nature and must be designed into the driver
  127.     itself.
  128.  
  129.     A new class of program called "Application Special Purpose
  130.     I/O Routine", or more commonly, IOPL, allows user level
  131.     apps to access I/O ports that would not normally be
  132.     available at CPL=3.  The IOPL runs at CPL=2 thus allowing
  133.     an easy path to the hardware.
  134.  
  135.     Multitasking is the main new feature of OS/2.  It is based
  136.     on the model of sessions (up to 12 per machine) that
  137.     contain processes that have at least one thread executing
  138.     in them.  Processes can be thought of as the "owners" of
  139.     allocated memory, file handles, etc., while threads share
  140.     common access to data within a process and are the actual
  141.     code of a process.
  142.  
  143.     OS/2 uses priority based execution with three levels of
  144.     task priorities: time critical, regular, and idle.  Idle
  145.     tasks are run only in the CPU's idle time while time
  146.     critical tasks are run whenever needed.  Most programs
  147.     fall into the regular category.  Regular tasks are
  148.     protected from starvation by the MAXWAIT option in
  149.     CONFIG.SYS. 
  150.  
  151.     Subsystem is the model used for O/S extensability.  This
  152.     is roughly comparable to the way that DOS device drivers
  153.     are currently used.  Currently the keyboard, mouse, and
  154.     video are implemented as subsystems.  This eases
  155.     replaceability of this code.  In the Extended Edition, the
  156.     Comms and Database Managers are also subsystems.  This
  157.     code runs at the caller's CPL.
  158.  
  159.     The current OS/2 filesystem is the DOS filesystem
  160.     including its 32Mb limits.  This filesystem is replaceable
  161.     but the IBM reps wouldn't say when or how.
  162.  
  163.     The big "gotcha" in OS/2 is the size of the registers
  164.     stored in a task switch.  Because it uses a 286 compatible
  165.     TSS when running on an 80386, only the lower 16 bits of
  166.     the registers are preserved.  If an application uses the
  167.     32 bit forms of the CPU's registers, the high order 16
  168.     bits will be trashed by other applications that do
  169.     likewise.  This same problem will occur with other 8086
  170.     multitaskers such as Double DOS and Multilink.
  171.  
  172.  
  173. PS/2
  174.  
  175.     Option boards and configuration - there is a 16-bit
  176.     identification register on each option board.  IBM
  177.     reserves the first 32K IDs for their own use; the other
  178.     32K IDs are available to outside developers and are
  179.     coordinated by IBM (Hayward Rigsby 305/241-5455).  Cards
  180.     that clone the ones available from IBM can use the same ID
  181.     numbers if "the boards will pass power on test and
  182.     configuration".
  183.  
  184.     Bus slots are numbered and individually addressable
  185.     allowing option boards to optionally "answerback" when
  186.     selected.  Port 96H is used to select a card by its ID
  187.     number for configuration and setup.  Ports 100-107H are
  188.     used to access POS registers (Program Option Select) on
  189.     the option card.  There is a sleep bit defined in these
  190.     registers for all option boards - it is used by the OS to
  191.     manage port conflicts by sleeping boards that are not in
  192.     use.  There is also a channel check bit on each board that
  193.     can be interrogated by the OS to determine who caused the
  194.     fault.  The bus timeout mechanism ensures that ailing or
  195.     offending boards can be controlled by the OS.
  196.  
  197.     The VGA supports all EGA/CGA/Mono modes to provide
  198.     backward compatibility plus 6 new modes.  All 200 line
  199.     modes are scan doubled to 400 lines to give better quality
  200.     display.  All of the VGA's registers are readable which
  201.     eases virtualization in a multitasking OS.  All video
  202.     modes are available on all monitors - gray scale summing
  203.     is done on monochrome monitors.
  204.  
  205.     8514/A Advanced Video Board - A high end graphics product
  206.     that was featured at the seminar.  It uses the extended
  207.     video slot of the Micro Channel to intercept control from
  208.     the VGA.  Capable of 1024x768 and 640x480 pels with 256
  209.     colors from palette of 256K.  It is capable of modifying
  210.     64 bits in a single 140ns cycle.  The only interface
  211.     provided by IBM is a high level application interface with
  212.     with verbs such as DRAW, FILL, BLT, MIX, MASK, and
  213.     SCISSOR.  IBM has chosen to make the lower level interface
  214.     such as registers and modes proprietary to prevent future
  215.     compatibility problems ("If we let you use the modes,
  216.     we'll have to support them in future products whether we
  217.     like them or not ... ").  Unused video RAM is used as a
  218.     font cache, characters are BLTed onto the screen.
  219.  
  220.     The PS/2 announcements included a new lower cost baseband
  221.     PC network and PS/2 versions of all existing network
  222.     products.  The networks are not yet supported under OS/2
  223.     but the IBM folks would only say "networks are a very
  224.     strategic product" with a knowing look.
  225.  
  226.     The bus performs multidevice arbitration for up to 15
  227.     devices plus the CPU using 6 bus lines.  An ARB cycle can
  228.     be requested by any device and will be resolved within
  229.     300ns.  There is a programmable fairness algorithm and the
  230.     central arbiter can be inhibited via an I/O port.  DRAM
  231.     refresh cycles are hidden within ARB cycles.  A device
  232.     that is granted bus mastership can assert the BURST line
  233.     and will be guaranteed a minimum of 7.8 microseconds
  234.     (about 128 bytes).  The bus cannot be seized permanently
  235.     by a temporary bus master because the watchdog timer (and
  236.     other devices at ports below 100H) is not available on the
  237.     bus, guaranteeing that the main CPU will always regain
  238.     control.  The bus timeout and watchdog mechanisms generate
  239.     NMIs that cannot be masked by port 70H.
  240.  
  241.     There is a facility for RAM defect relocation that can be
  242.     used to remap defective memory out of the linear address
  243.     space.  This mapping has a 16K granularity on any 16K
  244.     boundary.  It may be possible to use this to emulate LIM
  245.     type bankswitching, but it may require disabling the 1Mb
  246.     of planar RAM before use.  The Model 30 has a 64K memory
  247.     mapping granularity.
  248.  
  249.     ABIOS - The Advanced BIOS is contained in ROM in the PS/2
  250.     systems.  It is primarily intended for OS use rather than
  251.     application use.  There is no ABIOS in AT machines so OS/2
  252.     is obviously not dependent on it.  This BIOS can be
  253.     replaced by disk and RAM based ABIOS code if desired.  The
  254.     PC compatible BIOS is now referred to as CBIOS.  ABIOS has
  255.     a call-based interface rather than the PC's
  256.     interrupt-based interface.  It is fully bimodal so it can
  257.     be used in real or protected mode.  There is a new BIOS
  258.     data area defined in high memory that occupies one K of
  259.     RAM.
  260.  
  261.     System security is provided by a password of up to 7
  262.     characters that is stored in battery backed CMOS RAM.  The
  263.     keylock is only used to prevent physical access to the
  264.     system unit.  The password is "unlocked" during POST and
  265.     "relocked" before booting the OS.  "There is a back door
  266.     for IBM service people."  There are three security modes:
  267.     power on security will not allow the machine to boot,
  268.     including the floppy disk; server security allows the
  269.     machine to boot and execute its AUTOEXEC.BAT but the
  270.     keyboard is locked until the password is entered.  A more
  271.     temporary form of security is provided by an program that
  272.     locks the keyboard only until the password is entered.
  273.  
  274.     The interrupt controller (PIC) is implemented in a VLSI
  275.     gate array (along with most other support functions).  It
  276.     is operated in level-sensitive mode rather than
  277.     edge-triggered as in the PC.  In fact, any attempt to
  278.     reprogram it into edge-triggered mode will be trapped and
  279.     converted to equivalent level-sensitive commands.
  280.     Interrupt sharing protocol is now an integral part of the
  281.     system rather than an afterthought (see the AT 339 TRM).
  282.     This allows more than one adapter to share a single
  283.     interrupt level.  Because of this possibility, programmers 
  284.     should avoid doing an EOI at the start of an ISR - EOI
  285.     should only be done after resetting the IRQ latch (if
  286.     any).
  287.  
  288.     Because OS/2 operates by switching between real and
  289.     protected mode, the system reset function that was
  290.     implemented with Int 15h on the AT has been improved by
  291.     the addition of a "hot" shutdown method that is much
  292.     faster than the 8042 (IBM claims 10X faster).  The
  293.     undocumented 80286 SHUTDOWN instruction (opcode 0F 05)
  294.     still works as expected causing a system reboot.
  295.  
  296.     Adapter cards can still install their own BIOS code during
  297.     POST via the "ROM scan" method.  There may be problems
  298.     with this in that the BIOS can put boards to sleep in case
  299.     of port or interrupt conflicts.  IBM recommended therefore
  300.     that initialisation be done under software control rather
  301.     than by ROM scan.
  302.  
  303.     The DMA controller is also implemented as custom VLSI.  It
  304.     provides a compatible 8237 at the expected ports, but adds
  305.     additional functionality such as making all registers
  306.     readable and an orthogonal interface that is accessed
  307.     through ports 18h and 1Ah.  Although all operations at
  308.     these ports are supposed to "shadow" to the compatible
  309.     ports, a quick hands-on showed that this was not
  310.     necessarily true.  All channels support 8 or 16 bit
  311.     transfers.  Memory-to-memory transfers are no longer
  312.     supported.  The DMA controller covers the full 24-bit
  313.     address space with no artificial 64K boundaries - there is
  314.     a limit of 16 megabytes that may be a problem on 386 based
  315.     systems.  Also, there are two "virtual" DMA channels that
  316.     can be mapped to various channels and programmed for
  317.     different ARB levels.
  318.  
  319.     The parallel port on the motherboard is bidirectional and
  320.     is used by the IBM Data Migration Facility to port code
  321.     and data from PC family machines.  The DMF provides a
  322.     Centronics-to-DB25 adapter and software that will transmit
  323.     files out a PC's printer port.
  324.  
  325.     The Model 60 and 80 machines can use an ESDI disk adapter
  326.     with 70 and 115 megabyte disks as well as the ST412/506
  327.     adapter with 44 megabyte disks.  The ESDI disks
  328.     automatically park their heads on power down to prevent
  329.     data loss.  The ESDI controller supports 32-bit data
  330.     transfers as well as 8- and 16-bit.  All PS/2 machines are
  331.     provided with disk cache software to enhance system
  332.     throughput.  The ESDI adapter may possibly be attributed
  333.     to Adaptec.
  334.  
  335.     Protection from radio frequency interference (EMC is the
  336.     buzzword at IBM) was a major design issue for the Micro
  337.     Channel and PS/2 machines because of the higher bus speeds
  338.     that are supported.  Every other pin on the bus is either
  339.     a power or ground so no signal is more than one pin away
  340.     from one, enhancing noise immunity.  The Option Retaining
  341.     Bracket (ORB) was used as a ground return on most PC bus
  342.     adapter cards - this is specifically forbidden on the
  343.     Micro Channel because it will circumvent the designed in
  344.     protections from radiation.
  345.     
  346.     Any adapter can assert the PREEMPT line on the bus to
  347.     become a bus master.  There is a programmable fairness
  348.     algorithm that can be used to tune bus arbitration between
  349.     masters.  A master can only hold the bus (maximum) until
  350.     the watchdog timer causes an NMI on the main CPU, thus
  351.     returning control to the CPU.  The timer is not accessible
  352.     over the bus and is not maskable with the normal NMI mask
  353.     so the system CPU is guaranteed to always regain control
  354.     from a "bus hog".  There is a hardware bus timeout that is
  355.     used to detect option card failures that would normally
  356.     hang the system.  A BIOS call can be used to determine
  357.     what slot is occupied by any given adapter card.  The bus 
  358.     was designed to use 150ns RAMs on adapter cards through a 
  359.     decode headstart mechanism in the bus cycle.  There is 
  360.     also a matched memory protocol (MMP) and fast cycle 
  361.     request available to support faster memory.  An auxiliary
  362.     video connector on one of the slots allows add-in video
  363.     boards to intercept VGA signals for their own use before
  364.     thay get to the external connector - this allows enhanced
  365.     video cards such as the 8514/A to use the VGA for
  366.     compatibility in addition to adding higher resolution.
  367.     The audio channel on the bus is intended for card-to-card
  368.     use.
  369.  
  370.     The PS/2 mouse appears to be a Microsoft mouse in that it
  371.     has 2 buttons, a 9-pin Hosiden connector, and the
  372.     ball/lock ring are identical to Microsoft's.  The physical
  373.     form factor of the mouse is slightly larger.  I could see
  374.     no evidence of the Microsoft InPort chip on the Model 50,
  375.     60, or 80 motherboards but that does not preclude its
  376.     inclusion in the custom gate arrays.  (One of the IBM
  377.     buzzwords during the presentation was "high IBM content of
  378.     the system".)
  379.  
  380.     When one of the seminar attendees asked about licensing
  381.     the Micro Channel for clone use, the IBM rep gave a very
  382.     circular answer something to the effect that it is the
  383.     responsibility for all manufacturers to honor the patents
  384.     and copyrights of others.  He also said that it is IBM's
  385.     policy to not license patents or copyrights.  My
  386.     interpretation is that IBM will attempt to prevent bus
  387.     cloning.  Contact Henry Hall at IBM's Purchase, NY
  388.     facility regarding intellectual properties issues.
  389.  
  390.     There are several "gotchas" in the system design that were
  391.     brought out at the seminar.  The first one had to do with
  392.     I/O and prefetch queues, all back-to-back I/Os should be
  393.     separated by a JMP $+2.  Another example was given on a
  394.     386 system,
  395.  
  396.              out 20h, 20h        ; EOI
  397.              jmp $+2
  398.              sti
  399.  
  400.     would allow the EOI to occur before interrupts are
  401.     reenabled.  All accesses to port 70h should be followed by
  402.     a read or write to port 71h, even on NMI mask accesses
  403.     that normally would not need this.  Failure to do so could
  404.     cause premature discharge of the CMOS backup battery.
  405.     There is a new BIOS data area defined at the top of memory.
  406.     It is the developers responsibility to not overwrite this
  407.     1K area (eg- with memory tests that attempt to write all
  408.     locations).  The CPU's LOCK pin is not connected to the
  409.     bus - this means that the software LOCK prefix is not
  410.     meaningful.  The BURST line can be used as a bus lock when
  411.     needed.
  412.  
  413.  
  414. Futures of OS/2
  415.  
  416.     OS/2, The Extended Edition, was covered in some depth at
  417.     the end of the seminar.  This version is due out sometime
  418.     in 1988.  It includes a Graphical User Interface based on
  419.     Microsoft Windows as well as an integrated Communication
  420.     Manager and Database Manager.
  421.  
  422.     The Communication Manager is not particularly useful for
  423.     communication as done by most current PC users.  Its main
  424.     features involved connectivity to larger IBM systems with
  425.     just a few gestures at PC-to-PC comms.  This fits in well
  426.     with the SAA concept but gets in the way of the typical PC
  427.     communicator.
  428.  
  429.     Likewise for the integrated Database Manager - it provides
  430.     an environment for data management that is very similar to
  431.     larger IBM systems.  However, it ignores PC standards such
  432.     as Dbase II/III compatibility and newer technologies such
  433.     as fulltext inverted databases which are starting to
  434.     become important now that optical media are being used on
  435.     PCs.
  436.  
  437.     Both of these OS extensions use the Subsytem abstraction
  438.     as a way to seamlessly enhance the base OS.  The extended
  439.     version does not run on ATs, only on PS/2 systems.
  440.  
  441.     <END>
  442.